# Copyright (C) 2014-2025  CEA, EDF
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
#
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#

from SketchAPI import *

from salome.shaper import model

model.begin()
partSet = model.moduleDocument()
model.addParameter(partSet, "Gap", "10")
model.addParameter(partSet, "Rod", "12")
model.addParameter(partSet, "Thickness", "25")
Part_1 = model.addPart(partSet)
Part_1.setName("Body")
Part_1_doc = Part_1.document()
model.addParameter(Part_1_doc, "Radius", "50", "Radius of the body")
model.addParameter(Part_1_doc, "Width", "25", "Width of body arms")
Sketch_1 = model.addSketch(Part_1_doc, model.defaultPlane("XOZ"))
SketchLine_1 = Sketch_1.addLine(50, 14.61148285474187, 50, 0)
SketchConstraintLength_1 = Sketch_1.setLength(SketchLine_1.result(), 14.61148285474187)
SketchLine_2 = Sketch_1.addLine(50, 0, 6, 0)
SketchConstraintCoincidence_1 = Sketch_1.setCoincident(SketchLine_1.endPoint(), SketchLine_2.startPoint())
SketchLine_3 = Sketch_1.addLine(7, 25, 16.13599978860571, 25)
SketchLine_3.setName("SketchLine_4")
SketchLine_3.result().setName("SketchLine_4")
SketchConstraintHorizontal_1 = Sketch_1.setHorizontal(SketchLine_3.result())
SketchConstraintHorizontal_2 = Sketch_1.setHorizontal(SketchLine_2.result())
SketchConstraintVertical_1 = Sketch_1.setVertical(SketchLine_1.result())
SketchConstraintVertical_1.setName("SketchConstraintVertical_2")
SketchArc_1 = Sketch_1.addArc(16.1359986285606, -59.99999999999999, 16.13599978860571, 25, 46.80399475966571, 19.27467447616896, True)
SketchConstraintCoincidence_2 = Sketch_1.setCoincident(SketchLine_3.endPoint(), SketchArc_1.startPoint())
SketchConstraintCoincidence_2.setName("SketchConstraintCoincidence_4")
SketchConstraintTangent_1 = Sketch_1.setTangent(SketchArc_1.results()[1], SketchLine_3.result())
SketchArc_2 = Sketch_1.addArc(45, 14.61145639129118, 46.80399475966571, 19.27467447616896, 50, 14.61148285474187, True)
SketchConstraintCoincidence_3 = Sketch_1.setCoincident(SketchArc_2.startPoint(), SketchArc_1.endPoint())
SketchConstraintCoincidence_3.setName("SketchConstraintCoincidence_6")
SketchConstraintCoincidence_4 = Sketch_1.setCoincident(SketchArc_2.endPoint(), SketchLine_1.startPoint())
SketchConstraintCoincidence_4.setName("SketchConstraintCoincidence_7")
SketchConstraintTangent_2 = Sketch_1.setTangent(SketchArc_1.results()[1], SketchArc_2.results()[1])
SketchConstraintTangent_3 = Sketch_1.setTangent(SketchArc_2.results()[1], SketchLine_1.result())
SketchPoint_1 = Sketch_1.addPoint(50, 17.96300027009704)
SketchPoint_1.setAuxiliary(True)
SketchConstraintCoincidence_5 = Sketch_1.setCoincident(SketchPoint_1.coordinates(), SketchLine_1.result())
SketchConstraintCoincidence_5.setName("SketchConstraintCoincidence_8")
SketchConstraintCoincidence_6 = Sketch_1.setCoincident(SketchPoint_1.result(), SketchArc_1.results()[1])
SketchConstraintCoincidence_6.setName("SketchConstraintCoincidence_9")
SketchConstraintRadius_1 = Sketch_1.setRadius(SketchArc_2.results()[1], 5)
SketchPoint_2 = Sketch_1.addPoint(model.selection("VERTEX", "PartSet/Origin"))
SketchConstraintRadius_2 = Sketch_1.setRadius(SketchArc_1.results()[1], 85)
SketchConstraintRadius_2.setName("SketchConstraintRadius_4")
SketchLine_4 = Sketch_1.addLine(model.selection("EDGE", "PartSet/OZ"))
SketchLine_4.setName("SketchLine_27")
SketchLine_4.result().setName("SketchLine_27")
SketchConstraintDistance_1 = Sketch_1.setDistance(SketchLine_4.result(), SketchLine_2.startPoint(), "Radius")
SketchConstraintDistance_1.setName("SketchConstraintDistance_13")
SketchConstraintDistance_2 = Sketch_1.setDistance(SketchLine_3.startPoint(), SketchLine_2.result(), "Thickness")
SketchConstraintDistance_2.setName("SketchConstraintDistance_14")
SketchLine_5 = Sketch_1.addLine(6, 0, 6, 24)
SketchLine_5.setName("SketchLine_28")
SketchLine_5.result().setName("SketchLine_28")
SketchLine_6 = Sketch_1.addLine(6, 24, 7, 25)
SketchLine_6.setName("SketchLine_29")
SketchLine_6.result().setName("SketchLine_29")
SketchConstraintCoincidence_7 = Sketch_1.setCoincident(SketchLine_5.endPoint(), SketchLine_6.startPoint())
SketchConstraintCoincidence_7.setName("SketchConstraintCoincidence_32")
SketchConstraintVertical_2 = Sketch_1.setVertical(SketchLine_5.result())
SketchConstraintVertical_2.setName("SketchConstraintVertical_3")
SketchConstraintDistance_3 = Sketch_1.setDistance(SketchLine_5.startPoint(), SketchLine_4.result(), "Rod/2")
SketchConstraintDistance_3.setName("SketchConstraintDistance_15")
SketchConstraintAngle_1 = Sketch_1.setAngleComplementary(SketchLine_6.result(), SketchLine_5.result(), 45.00000000000006)
SketchConstraintAngle_1.setName("SketchConstraintAngle_3")
SketchConstraintDistance_4 = Sketch_1.setDistance(SketchLine_4.result(), SketchLine_6.endPoint(), "Rod/2 + 1")
SketchConstraintDistance_4.setName("SketchConstraintDistance_16")
SketchConstraintCoincidence_8 = Sketch_1.setCoincident(SketchLine_2.endPoint(), SketchLine_5.startPoint())
SketchConstraintCoincidence_8.setName("SketchConstraintCoincidence_33")
SketchConstraintCoincidence_9 = Sketch_1.setCoincident(SketchLine_6.endPoint(), SketchLine_3.startPoint())
SketchConstraintCoincidence_9.setName("SketchConstraintCoincidence_34")
SketchLine_7 = Sketch_1.addLine(model.selection("EDGE", "PartSet/OX"))
SketchLine_7.setName("SketchLine_30")
SketchLine_7.result().setName("SketchLine_30")
SketchConstraintCoincidence_10 = Sketch_1.setCoincident(SketchLine_5.startPoint(), SketchLine_7.result())
SketchConstraintCoincidence_10.setName("SketchConstraintCoincidence_35")
model.do()
Revolution_1 = model.addRevolution(Part_1_doc, [model.selection("FACE", "Sketch_1/Face-SketchArc_2_2f-SketchArc_1_2f-SketchLine_4r-SketchLine_29r-SketchLine_28r-SketchLine_2r-SketchLine_1r")], model.selection("EDGE", "PartSet/OZ"), 360, 0)
Sketch_2 = model.addSketch(Part_1_doc, model.selection("FACE", "Revolution_1_1/Generated_Face&Sketch_1/SketchLine_2"))
SketchLine_8 = Sketch_2.addLine(0, 0, 25, 43.30127018922193)
SketchLine_8.setName("SketchLine_5")
SketchLine_8.result().setName("SketchLine_5")
SketchLine_8.setAuxiliary(True)
SketchPoint_3 = Sketch_2.addPoint(model.selection("VERTEX", "PartSet/Origin"))
SketchConstraintCoincidence_11 = Sketch_2.setCoincident(SketchLine_8.startPoint(), SketchPoint_3.result())
SketchCircle_1 = Sketch_2.addCircle(model.selection("EDGE", "[Revolution_1_1/Generated_Face&Sketch_1/SketchLine_2][Revolution_1_1/Generated_Face&Sketch_1/SketchLine_1]"))
SketchConstraintCoincidence_12 = Sketch_2.setCoincident(SketchLine_8.endPoint(), SketchCircle_1.results()[1])
SketchLine_9 = Sketch_2.addLine(39.43375672974064, -43.30127018922192, 15.87711932209923, -2.499977343709401)
SketchLine_9.setName("SketchLine_10")
SketchLine_9.result().setName("SketchLine_10")
SketchLine_10 = Sketch_2.addLine(0, 0, 25, -43.30127018922193)
SketchLine_10.setName("SketchLine_6")
SketchLine_10.result().setName("SketchLine_6")
SketchLine_10.setAuxiliary(True)
SketchConstraintCoincidence_13 = Sketch_2.setCoincident(SketchLine_10.startPoint(), SketchPoint_3.result())
SketchCircle_2 = Sketch_2.addCircle(model.selection("EDGE", "[Revolution_1_1/Generated_Face&Sketch_1/SketchLine_2][Revolution_1_1/Generated_Face&Sketch_1/SketchLine_1]"))
SketchConstraintCoincidence_14 = Sketch_2.setCoincident(SketchLine_10.endPoint(), SketchCircle_2.results()[1])
SketchLine_11 = Sketch_2.addLine(15.87713238415337, 2.499999967850816, 39.43375672974065, 43.30127018922192)
SketchLine_11.setName("SketchLine_11")
SketchLine_11.result().setName("SketchLine_11")
SketchLine_12 = Sketch_2.addLine(model.selection("EDGE", "PartSet/OX"))
SketchLine_12.setName("SketchLine_7")
SketchLine_12.result().setName("SketchLine_7")
SketchConstraintAngle_2 = Sketch_2.setAngleBackward(SketchLine_12.result(), SketchLine_10.result(), 59.99999999999994)
SketchConstraintAngle_2.setName("SketchConstraintAngle_1")
SketchConstraintAngle_3 = Sketch_2.setAngle(SketchLine_12.result(), SketchLine_8.result(), 59.99999999999999)
SketchConstraintAngle_3.setName("SketchConstraintAngle_2")
SketchLine_13 = Sketch_2.addLine(14.43375672974065, -4.667176185980158e-016, 39.43375672974065, 43.30127018922192)
SketchLine_13.setName("SketchLine_9")
SketchLine_13.result().setName("SketchLine_9")
SketchLine_13.setAuxiliary(True)
SketchLine_14 = Sketch_2.addLine(39.43375672974064, -43.30127018922192, 14.43375672974065, -4.667176185980158e-016)
SketchLine_14.setName("SketchLine_8")
SketchLine_14.result().setName("SketchLine_8")
SketchLine_14.setAuxiliary(True)
SketchConstraintCoincidence_15 = Sketch_2.setCoincident(SketchLine_14.endPoint(), SketchLine_13.startPoint())
SketchConstraintCoincidence_15.setName("SketchConstraintCoincidence_16")
SketchConstraintParallel_1 = Sketch_2.setParallel(SketchLine_14.result(), SketchLine_10.result())
SketchConstraintParallel_2 = Sketch_2.setParallel(SketchLine_13.result(), SketchLine_8.result())
SketchConstraintEqual_1 = Sketch_2.setEqual(SketchLine_8.result(), SketchLine_14.result())
SketchConstraintEqual_2 = Sketch_2.setEqual(SketchLine_10.result(), SketchLine_13.result())
SketchConstraintDistance_5 = Sketch_2.setDistance(SketchLine_13.startPoint(), SketchLine_10.result(), "Width/2")
SketchConstraintDistance_5.setName("SketchConstraintDistance_4")
SketchArc_3 = Sketch_2.addArc(20.20725942163691, 2.933703812344835e-015, 15.87713238415337, 2.499999967850816, 15.87711932209923, -2.499977343709401, False)
SketchConstraintCoincidence_16 = Sketch_2.setCoincident(SketchArc_3.startPoint(), SketchLine_11.startPoint())
SketchConstraintCoincidence_16.setName("SketchConstraintCoincidence_15")
SketchConstraintCoincidence_17 = Sketch_2.setCoincident(SketchArc_3.endPoint(), SketchLine_9.endPoint())
SketchConstraintTangent_4 = Sketch_2.setTangent(SketchArc_3.results()[1], SketchLine_9.result())
SketchConstraintTangent_5 = Sketch_2.setTangent(SketchArc_3.results()[1], SketchLine_11.result())
SketchConstraintCoincidence_18 = Sketch_2.setCoincident(SketchLine_14.startPoint(), SketchLine_9.startPoint())
SketchConstraintCoincidence_19 = Sketch_2.setCoincident(SketchLine_13.endPoint(), SketchLine_11.endPoint())
SketchConstraintCoincidence_20 = Sketch_2.setCoincident(SketchLine_9.endPoint(), SketchLine_14.result())
SketchConstraintCoincidence_21 = Sketch_2.setCoincident(SketchLine_11.startPoint(), SketchLine_13.result())
SketchConstraintRadius_3 = Sketch_2.setRadius(SketchArc_3.results()[1], 5)
SketchConstraintRadius_3.setName("SketchConstraintRadius_2")
SketchConstraintDistance_6 = Sketch_2.setDistance(SketchLine_13.startPoint(), SketchLine_8.result(), "Width/2")
SketchConstraintDistance_6.setName("SketchConstraintDistance_5")
SketchArc_4 = Sketch_2.addArc(14.43375672974064, -1.454136002932938e-015, 39.43375672974064, -43.30127018922192, 39.43375672974065, 43.30127018922192, False)
SketchConstraintCoincidence_22 = Sketch_2.setCoincident(SketchLine_9.startPoint(), SketchArc_4.startPoint())
SketchConstraintCoincidence_23 = Sketch_2.setCoincident(SketchLine_14.startPoint(), SketchArc_4.startPoint())
SketchConstraintCoincidence_24 = Sketch_2.setCoincident(SketchLine_11.endPoint(), SketchArc_4.endPoint())
SketchConstraintCoincidence_25 = Sketch_2.setCoincident(SketchLine_13.endPoint(), SketchArc_4.endPoint())
SketchConstraintEqual_3 = Sketch_2.setEqual(SketchArc_4.results()[1], SketchCircle_1.results()[1])
SketchMultiRotation_1_objects = [SketchLine_11.result(), SketchArc_3.results()[1], SketchLine_9.result(), SketchArc_4.results()[1]]
SketchMultiRotation_1 = Sketch_2.addRotation(SketchMultiRotation_1_objects, SketchCircle_2.center(), 120, 3)
[SketchLine_15, SketchLine_16, SketchArc_5, SketchArc_6, SketchLine_17, SketchLine_18, SketchArc_7, SketchArc_8] = SketchMultiRotation_1.rotated()
SketchArc_7.setName("SketchArc_6")
SketchArc_7.result().setName("SketchArc_6")
SketchArc_7.results()[1].setName("SketchArc_6_2")
SketchLine_18.setName("SketchLine_15")
SketchLine_18.result().setName("SketchLine_15")
SketchLine_17.setName("SketchLine_13")
SketchLine_17.result().setName("SketchLine_13")
SketchArc_6.setName("SketchArc_7")
SketchArc_6.result().setName("SketchArc_7")
SketchArc_6.results()[1].setName("SketchArc_7_2")
SketchLine_16.setName("SketchLine_14")
SketchLine_16.result().setName("SketchLine_14")
SketchLine_15.setName("SketchLine_12")
SketchLine_15.result().setName("SketchLine_12")
SketchLine_19 = Sketch_2.addLine(7.828185376255509, -23.55881480274223, 31.38482278389692, -64.36010764825475)
SketchLine_19.setName("SketchLine_16")
SketchLine_19.result().setName("SketchLine_16")
SketchLine_20 = Sketch_2.addLine(31.38482278389692, -64.36010764825475, 40.0450768217413, -59.36010764825475)
SketchLine_20.setName("SketchLine_17")
SketchLine_20.result().setName("SketchLine_17")
SketchConstraintCoincidence_26 = Sketch_2.setCoincident(SketchLine_19.endPoint(), SketchLine_20.startPoint())
SketchConstraintCoincidence_26.setName("SketchConstraintCoincidence_28")
SketchLine_21 = Sketch_2.addLine(40.0450768217413, -59.36010764825475, 16.48843941409989, -18.55881480274223)
SketchLine_21.setName("SketchLine_18")
SketchLine_21.result().setName("SketchLine_18")
SketchConstraintCoincidence_27 = Sketch_2.setCoincident(SketchLine_20.endPoint(), SketchLine_21.startPoint())
SketchConstraintCoincidence_27.setName("SketchConstraintCoincidence_29")
SketchConstraintParallel_3 = Sketch_2.setParallel(SketchLine_10.result(), SketchLine_19.result())
SketchConstraintParallel_4 = Sketch_2.setParallel(SketchLine_10.result(), SketchLine_21.result())
SketchConstraintEqual_4 = Sketch_2.setEqual(SketchLine_9.result(), SketchLine_21.result())
SketchConstraintEqual_5 = Sketch_2.setEqual(SketchLine_9.result(), SketchLine_19.result())
SketchConstraintDistance_7 = Sketch_2.setDistance(SketchCircle_1.center(), SketchLine_19.result(), "Gap/2")
SketchConstraintDistance_7.setName("SketchConstraintDistance_6")
SketchConstraintDistance_8 = Sketch_2.setDistance(SketchCircle_1.center(), SketchLine_21.result(), "Gap/2")
SketchConstraintDistance_8.setName("SketchConstraintDistance_7")
SketchArc_9 = Sketch_2.addArc(10.5, -18.18653347947321, 7.828185376255509, -23.55881480274223, 16.48843941409989, -18.55881480274223, True)
SketchConstraintCoincidence_28 = Sketch_2.setCoincident(SketchArc_9.center(), SketchLine_10.result())
SketchConstraintCoincidence_28.setName("SketchConstraintCoincidence_27")
SketchConstraintCoincidence_29 = Sketch_2.setCoincident(SketchLine_19.startPoint(), SketchArc_9.startPoint())
SketchConstraintCoincidence_29.setName("SketchConstraintCoincidence_30")
SketchConstraintCoincidence_30 = Sketch_2.setCoincident(SketchArc_9.endPoint(), SketchLine_21.endPoint())
SketchConstraintCoincidence_30.setName("SketchConstraintCoincidence_31")
SketchConstraintRadius_4 = Sketch_2.setRadius(SketchArc_9.results()[1], 6)
SketchConstraintRadius_4.setName("SketchConstraintRadius_3")
SketchMultiRotation_2_objects = [SketchLine_19.result(), SketchLine_20.result(), SketchLine_21.result(), SketchArc_9.results()[1]]
SketchMultiRotation_2 = Sketch_2.addRotation(SketchMultiRotation_2_objects, SketchCircle_1.center(), 120, 3)
[SketchLine_22, SketchLine_23, SketchLine_24, SketchLine_25, SketchLine_26, SketchLine_27, SketchArc_10, SketchArc_11] = SketchMultiRotation_2.rotated()
SketchLine_27.setName("SketchLine_24")
SketchLine_27.result().setName("SketchLine_24")
SketchLine_26.setName("SketchLine_21")
SketchLine_26.result().setName("SketchLine_21")
SketchLine_25.setName("SketchLine_23")
SketchLine_25.result().setName("SketchLine_23")
SketchLine_24.setName("SketchLine_20")
SketchLine_24.result().setName("SketchLine_20")
SketchLine_23.setName("SketchLine_22")
SketchLine_23.result().setName("SketchLine_22")
SketchLine_22.setName("SketchLine_19")
SketchLine_22.result().setName("SketchLine_19")
SketchConstraintDistance_9 = Sketch_2.setDistance(SketchArc_9.center(), SketchPoint_3.coordinates(), 21)
SketchConstraintDistance_9.setName("SketchConstraintDistance_8")
model.do()
Extrusion_1 = model.addExtrusion(Part_1_doc, [model.selection("WIRE", "Sketch_2/Face-SketchArc_4_2f-SketchLine_11r-SketchArc_3_2f-SketchLine_10r_wire"), model.selection("WIRE", "Sketch_2/Face-SketchArc_7_2f-SketchLine_15r-SketchArc_8_2f-SketchLine_14r_wire"), model.selection("FACE", "Sketch_2/Face-SketchArc_5_2f-SketchLine_13r-SketchArc_6_2f-SketchLine_12r"), model.selection("FACE", "Sketch_2/Face-SketchLine_19f-SketchLine_20f-SketchLine_21f-SketchArc_10_2f"), model.selection("FACE", "Sketch_2/Face-SketchLine_16f-SketchLine_17f-SketchLine_18f-SketchArc_9_2f"), model.selection("WIRE", "Sketch_2/Face-SketchLine_22f-SketchLine_23f-SketchLine_24f-SketchArc_11_2f_wire")], model.selection(), model.selection(), 10, model.selection("FACE", "Revolution_1_1/Generated_Face&Sketch_1/SketchLine_4"), 10)
Cut_1 = model.addCut(Part_1_doc, [model.selection("SOLID", "Revolution_1_1")], [model.selection("SOLID", "Extrusion_1_1"), model.selection("SOLID", "Extrusion_1_4"), model.selection("SOLID", "Extrusion_1_5")])
Cut_2 = model.addCut(Part_1_doc, [model.selection("SOLID", "Cut_1_1")], [model.selection("SOLID", "Extrusion_1_2"), model.selection("SOLID", "Extrusion_1_3"), model.selection("SOLID", "Extrusion_1_6")])
Plane_4 = model.addPlane(Part_1_doc, model.selection("FACE", "Cut_2_1/Modified_Face&Sketch_2/SketchLine_21"), model.selection("FACE", "Cut_2_1/Modified_Face&Sketch_2/SketchLine_19"))
Sketch_3 = model.addSketch(Part_1_doc, model.selection("FACE", "Plane_1"))
SketchCircle_3 = Sketch_3.addCircle(25, -10, 4)
SketchCircle_4 = Sketch_3.addCircle(40, -10, 4)
SketchConstraintRadius_5 = Sketch_3.setRadius(SketchCircle_4.results()[1], 4)
SketchConstraintEqual_6 = Sketch_3.setEqual(SketchCircle_3.results()[1], SketchCircle_4.results()[1])
SketchLine_28 = Sketch_3.addLine(model.selection("EDGE", "PartSet/OZ"))
SketchLine_28.setName("SketchLine_25")
SketchLine_28.result().setName("SketchLine_25")
SketchConstraintDistance_10 = Sketch_3.setDistance(SketchCircle_3.center(), SketchLine_28.result(), 25)
SketchConstraintDistance_10.setName("SketchConstraintDistance_9")
SketchConstraintDistance_11 = Sketch_3.setDistance(SketchCircle_4.center(), SketchLine_28.result(), 40)
SketchConstraintDistance_11.setName("SketchConstraintDistance_10")
SketchProjection_1 = Sketch_3.addProjection(model.selection("EDGE", "Cut_2_1/Generated_Edge&Sketch_2/SketchLine_21&Sketch_1/SketchLine_2"), False)
SketchLine_29 = SketchProjection_1.createdFeature()
SketchLine_29.setName("SketchLine_26")
SketchLine_29.result().setName("SketchLine_26")
SketchConstraintDistance_12 = Sketch_3.setDistance(SketchCircle_4.center(), SketchLine_29.result(), 10)
SketchConstraintDistance_12.setName("SketchConstraintDistance_11")
SketchConstraintDistance_13 = Sketch_3.setDistance(SketchCircle_3.center(), SketchLine_29.result(), 10)
SketchConstraintDistance_13.setName("SketchConstraintDistance_12")
model.do()
Extrusion_2 = model.addExtrusion(Part_1_doc, [model.selection("FACE", "Sketch_3/Face-SketchCircle_3_2r"), model.selection("WIRE", "Sketch_3/Face-SketchCircle_4_2f_wire")], model.selection(), model.selection("FACE", "Cut_1_1/Modified_Face&Sketch_2/SketchLine_11"), 5, model.selection("FACE", "Cut_1_1/Modified_Face&Sketch_2/SketchLine_13"), 5)
Cut_3 = model.addCut(Part_1_doc, [model.selection("SOLID", "Cut_2_1")], [model.selection("SOLID", "Extrusion_2_1"), model.selection("SOLID", "Extrusion_2_2")])
Recover_1 = model.addRecover(Part_1_doc, Cut_3, [Extrusion_2.results()[1], Extrusion_2.result()])
Rotation_1 = model.addRotation(Part_1_doc, [model.selection("SOLID", "Recover_1_1"), model.selection("SOLID", "Recover_1_2")], model.selection("EDGE", "PartSet/OZ"), 120)
Cut_4 = model.addCut(Part_1_doc, [model.selection("SOLID", "Cut_3_1")], [model.selection("SOLID", "Rotation_1_1"), model.selection("SOLID", "Rotation_1_2")])
Recover_2 = model.addRecover(Part_1_doc, Cut_4, [Rotation_1.results()[1], Rotation_1.result()])
Rotation_2 = model.addRotation(Part_1_doc, [model.selection("SOLID", "Recover_2_1"), model.selection("SOLID", "Recover_2_2")], model.selection("EDGE", "PartSet/OZ"), 120)
Cut_5 = model.addCut(Part_1_doc, [model.selection("SOLID", "Cut_4_1")], [model.selection("SOLID", "Rotation_2_2"), model.selection("SOLID", "Rotation_2_1")])
model.do()
Part_2 = model.addPart(partSet)
Part_2.setName("Arm 1")
Part_2_doc = Part_2.document()
model.addParameter(Part_2_doc, "a", "7.5")
model.addParameter(Part_2_doc, "b", "12.5")
model.addParameter(Part_2_doc, "c", "(a-b)/4")
Sketch_4 = model.addSketch(Part_2_doc, model.defaultPlane("XOY"))
SketchLine_30 = Sketch_4.addLine(-7.563632736215193e-032, -5.762896622594646, 0, 3.75)
SketchLine_30.setAuxiliary(True)
SketchLine_31 = Sketch_4.addLine(0, 3.75, 4.894344934278314, 2.394344934278312)
SketchLine_31.setAuxiliary(True)
SketchConstraintCoincidence_31 = Sketch_4.setCoincident(SketchLine_30.endPoint(), SketchLine_31.startPoint())
SketchLine_32 = Sketch_4.addLine(4.894344934278314, 2.394344934278312, -7.563632736215193e-032, -5.762896622594646)
SketchLine_32.setAuxiliary(True)
SketchConstraintCoincidence_32 = Sketch_4.setCoincident(SketchLine_31.endPoint(), SketchLine_32.startPoint())
SketchConstraintCoincidence_33 = Sketch_4.setCoincident(SketchLine_30.startPoint(), SketchLine_32.endPoint())
SketchConstraintVertical_3 = Sketch_4.setVertical(SketchLine_30.result())
SketchLine_33 = Sketch_4.addLine(0, 3.75, 6.25, 3.75)
SketchLine_33.setAuxiliary(True)
SketchConstraintCoincidence_34 = Sketch_4.setCoincident(SketchLine_30.endPoint(), SketchLine_33.startPoint())
SketchConstraintCoincidence_35 = Sketch_4.setCoincident(SketchLine_31.startPoint(), SketchLine_33.startPoint())
SketchLine_34 = Sketch_4.addLine(6.25, 3.75, 6.25, 0)
SketchLine_34.setAuxiliary(True)
SketchConstraintCoincidence_36 = Sketch_4.setCoincident(SketchLine_33.endPoint(), SketchLine_34.startPoint())
SketchLine_35 = Sketch_4.addLine(6.25, 0, 0, 0)
SketchLine_35.setAuxiliary(True)
SketchConstraintCoincidence_37 = Sketch_4.setCoincident(SketchLine_34.endPoint(), SketchLine_35.startPoint())
SketchConstraintCoincidence_38 = Sketch_4.setCoincident(SketchLine_35.endPoint(), SketchLine_30.result())
SketchConstraintHorizontal_3 = Sketch_4.setHorizontal(SketchLine_35.result())
SketchConstraintHorizontal_4 = Sketch_4.setHorizontal(SketchLine_33.result())
SketchConstraintVertical_4 = Sketch_4.setVertical(SketchLine_34.result())
SketchLine_36 = Sketch_4.addLine(-7.563632736215193e-032, -5.762896622594646, 2.447172467139156, 3.072172467139157)
SketchLine_36.setAuxiliary(True)
SketchConstraintCoincidence_39 = Sketch_4.setCoincident(SketchLine_30.startPoint(), SketchLine_36.startPoint())
SketchConstraintCoincidence_40 = Sketch_4.setCoincident(SketchLine_32.endPoint(), SketchLine_36.startPoint())
SketchConstraintCoincidence_41 = Sketch_4.setCoincident(SketchLine_36.endPoint(), SketchLine_31.result())
SketchConstraintPerpendicular_1 = Sketch_4.setPerpendicular(SketchLine_36.result(), SketchLine_31.result())
SketchPoint_4 = Sketch_4.addPoint(model.selection("VERTEX", "PartSet/Origin"))
SketchConstraintCoincidence_42 = Sketch_4.setCoincident(SketchLine_35.endPoint(), SketchPoint_4.coordinates())
SketchConstraintCoincidence_42.setName("SketchConstraintCoincidence_20")
SketchConstraintLength_1 = Sketch_4.setLength(SketchLine_33.result(), "b/2")
SketchConstraintLength_2 = Sketch_4.setLength(SketchLine_34.result(), "a/2")
SketchCircle_5 = Sketch_4.addCircle(1.25, -1.25, 1.25)
SketchCircle_5.setAuxiliary(True)
SketchConstraintRadius_6 = Sketch_4.setRadius(SketchCircle_5.results()[1], "(b-a)/4")
SketchConstraintTangent_6 = Sketch_4.setTangent(SketchCircle_5.results()[1], SketchLine_35.result())
SketchConstraintTangent_7 = Sketch_4.setTangent(SketchCircle_5.results()[1], SketchLine_30.result())
SketchConstraintTangent_8 = Sketch_4.setTangent(SketchCircle_5.results()[1], SketchLine_32.result())
SketchLine_37 = Sketch_4.addLine(4.894344934278314, 2.394344934278312, 6.25, 0)
SketchLine_37.setAuxiliary(True)
SketchConstraintCoincidence_44 = Sketch_4.setCoincident(SketchLine_31.endPoint(), SketchLine_37.startPoint())
SketchConstraintCoincidence_45 = Sketch_4.setCoincident(SketchLine_32.startPoint(), SketchLine_37.startPoint())
SketchConstraintCoincidence_46 = Sketch_4.setCoincident(SketchLine_34.endPoint(), SketchLine_37.endPoint())
SketchConstraintCoincidence_47 = Sketch_4.setCoincident(SketchLine_35.startPoint(), SketchLine_37.endPoint())
SketchLine_38 = Sketch_4.addLine(0, 3.75, 6.25, 0)
SketchLine_38.setName("SketchLine_10")
SketchLine_38.result().setName("SketchLine_10")
SketchLine_38.setAuxiliary(True)
SketchConstraintCoincidence_48 = Sketch_4.setCoincident(SketchLine_30.endPoint(), SketchLine_38.startPoint())
SketchConstraintCoincidence_48.setName("SketchConstraintCoincidence_23")
SketchConstraintCoincidence_49 = Sketch_4.setCoincident(SketchLine_31.startPoint(), SketchLine_38.startPoint())
SketchConstraintCoincidence_49.setName("SketchConstraintCoincidence_24")
SketchConstraintCoincidence_50 = Sketch_4.setCoincident(SketchLine_33.startPoint(), SketchLine_38.startPoint())
SketchConstraintCoincidence_50.setName("SketchConstraintCoincidence_25")
SketchConstraintCoincidence_51 = Sketch_4.setCoincident(SketchLine_34.endPoint(), SketchLine_38.endPoint())
SketchConstraintCoincidence_51.setName("SketchConstraintCoincidence_26")
SketchConstraintCoincidence_52 = Sketch_4.setCoincident(SketchLine_35.startPoint(), SketchLine_38.endPoint())
SketchConstraintCoincidence_52.setName("SketchConstraintCoincidence_27")
SketchConstraintCoincidence_53 = Sketch_4.setCoincident(SketchLine_37.endPoint(), SketchLine_38.endPoint())
SketchConstraintCoincidence_53.setName("SketchConstraintCoincidence_28")
SketchConstraintPerpendicular_2 = Sketch_4.setPerpendicular(SketchLine_32.result(), SketchLine_38.result())
SketchConstraintPerpendicular_2.setName("SketchConstraintPerpendicular_3")
SketchLine_39 = Sketch_4.addLine(model.selection("EDGE", "PartSet/OY"))
SketchLine_39.setName("SketchLine_11")
SketchLine_39.result().setName("SketchLine_11")
SketchLine_40 = Sketch_4.addLine(model.selection("EDGE", "PartSet/OX"))
SketchLine_40.setName("SketchLine_12")
SketchLine_40.result().setName("SketchLine_12")
SketchArc_12 = Sketch_4.addArc(-7.563632736215193e-032, -5.762896622594646, 0, 3.75, 4.894344934278314, 2.394344934278312, True)
SketchConstraintCoincidence_54 = Sketch_4.setCoincident(SketchLine_30.endPoint(), SketchArc_12.startPoint())
SketchConstraintCoincidence_54.setName("SketchConstraintCoincidence_30")
SketchConstraintCoincidence_55 = Sketch_4.setCoincident(SketchLine_31.startPoint(), SketchArc_12.startPoint())
SketchConstraintCoincidence_55.setName("SketchConstraintCoincidence_31")
SketchConstraintCoincidence_56 = Sketch_4.setCoincident(SketchLine_33.startPoint(), SketchArc_12.startPoint())
SketchConstraintCoincidence_56.setName("SketchConstraintCoincidence_32")
SketchConstraintCoincidence_57 = Sketch_4.setCoincident(SketchLine_38.startPoint(), SketchArc_12.startPoint())
SketchConstraintCoincidence_57.setName("SketchConstraintCoincidence_33")
SketchConstraintCoincidence_58 = Sketch_4.setCoincident(SketchArc_12.endPoint(), SketchLine_31.endPoint())
SketchConstraintCoincidence_58.setName("SketchConstraintCoincidence_34")
SketchConstraintCoincidence_59 = Sketch_4.setCoincident(SketchArc_12.center(), SketchLine_32.endPoint())
SketchConstraintCoincidence_59.setName("SketchConstraintCoincidence_35")
SketchArc_13 = Sketch_4.addArc(3.457737973711348, 3.788069295318559e-014, 6.25, 0, 4.894344934278314, 2.394344934278312, False)
SketchArc_13.setName("SketchArc_4")
SketchArc_13.result().setName("SketchArc_4")
SketchArc_13.results()[1].setName("SketchArc_4_2")
SketchConstraintCoincidence_60 = Sketch_4.setCoincident(SketchArc_13.startPoint(), SketchLine_35.startPoint())
SketchConstraintCoincidence_60.setName("SketchConstraintCoincidence_48")
SketchConstraintCoincidence_61 = Sketch_4.setCoincident(SketchArc_13.endPoint(), SketchArc_12.endPoint())
SketchConstraintCoincidence_61.setName("SketchConstraintCoincidence_49")
SketchConstraintCoincidence_43 = Sketch_4.setCoincident(SketchArc_13.center(), SketchLine_32.result())
SketchConstraintCoincidence_43.setName("SketchConstraintCoincidence_21")
SketchConstraintMirror_1 = Sketch_4.addMirror(SketchLine_40.result(), [SketchArc_13.results()[1], SketchArc_12.results()[1]])
[SketchArc_14, SketchArc_15] = SketchConstraintMirror_1.mirrored()
SketchArc_15.setName("SketchArc_6")
SketchArc_15.result().setName("SketchArc_6")
SketchArc_15.results()[1].setName("SketchArc_6_2")
SketchArc_14.setName("SketchArc_5")
SketchArc_14.result().setName("SketchArc_5")
SketchArc_14.results()[1].setName("SketchArc_5_2")
SketchConstraintMirror_2_objects = [SketchArc_12.results()[1], SketchArc_13.results()[1], SketchArc_14.results()[1], SketchArc_15.results()[1]]
SketchConstraintMirror_2 = Sketch_4.addMirror(SketchLine_39.result(), SketchConstraintMirror_2_objects)
[SketchArc_16, SketchArc_17, SketchArc_18, SketchArc_19] = SketchConstraintMirror_2.mirrored()
SketchArc_19.setName("SketchArc_10")
SketchArc_19.result().setName("SketchArc_10")
SketchArc_19.results()[1].setName("SketchArc_10_2")
SketchArc_18.setName("SketchArc_9")
SketchArc_18.result().setName("SketchArc_9")
SketchArc_18.results()[1].setName("SketchArc_9_2")
SketchArc_17.setName("SketchArc_8")
SketchArc_17.result().setName("SketchArc_8")
SketchArc_17.results()[1].setName("SketchArc_8_2")
SketchArc_16.setName("SketchArc_7")
SketchArc_16.result().setName("SketchArc_7")
SketchArc_16.results()[1].setName("SketchArc_7_2")
model.do()
Sketch_5 = model.addSketch(Part_2_doc, model.defaultPlane("XOZ"))
SketchArc_20 = Sketch_5.addArc(75, 0, 21.9522369740045, 53.01825004597796, 20.93617039352901, -51.98174995402206, False)
SketchArc_20.setName("SketchArc_3")
SketchArc_20.result().setName("SketchArc_3")
SketchArc_20.results()[1].setName("SketchArc_3_2")
SketchArc_20.setAuxiliary(True)
SketchConstraintRadius_7 = Sketch_5.setRadius(SketchArc_20.results()[1], 75)
SketchLine_41 = Sketch_5.addLine(model.selection("EDGE", "PartSet/OX"))
SketchLine_41.setName("SketchLine_13")
SketchLine_41.result().setName("SketchLine_13")
SketchConstraintCoincidence_73 = Sketch_5.setCoincident(SketchArc_20.center(), SketchLine_41.result())
SketchConstraintCoincidence_73.setName("SketchConstraintCoincidence_38")
SketchConstraintCoincidence_74 = Sketch_5.setCoincident(SketchLine_41.startPoint(), SketchArc_20.results()[1])
SketchConstraintCoincidence_74.setName("SketchConstraintCoincidence_39")
SketchLine_42 = Sketch_5.addLine(16.9522369740045, -56.98174995402205, 16.9522369740045, -46.98174995402206)
SketchLine_42.setName("SketchLine_14")
SketchLine_42.result().setName("SketchLine_14")
SketchLine_43 = Sketch_5.addLine(16.9522369740045, -46.98174995402206, 36.95223697400451, -46.98174995402206)
SketchLine_43.setName("SketchLine_15")
SketchLine_43.result().setName("SketchLine_15")
SketchConstraintCoincidence_75 = Sketch_5.setCoincident(SketchLine_42.endPoint(), SketchLine_43.startPoint())
SketchConstraintCoincidence_75.setName("SketchConstraintCoincidence_40")
SketchLine_44 = Sketch_5.addLine(36.95223697400451, -46.98174995402206, 31.17873428210827, -56.98174995402205)
SketchLine_44.setName("SketchLine_16")
SketchLine_44.result().setName("SketchLine_16")
SketchConstraintCoincidence_76 = Sketch_5.setCoincident(SketchLine_43.endPoint(), SketchLine_44.startPoint())
SketchConstraintCoincidence_76.setName("SketchConstraintCoincidence_41")
SketchLine_45 = Sketch_5.addLine(31.17873428210827, -56.98174995402205, 16.9522369740045, -56.98174995402205)
SketchLine_45.setName("SketchLine_17")
SketchLine_45.result().setName("SketchLine_17")
SketchConstraintCoincidence_77 = Sketch_5.setCoincident(SketchLine_44.endPoint(), SketchLine_45.startPoint())
SketchConstraintCoincidence_77.setName("SketchConstraintCoincidence_42")
SketchConstraintCoincidence_78 = Sketch_5.setCoincident(SketchLine_42.startPoint(), SketchLine_45.endPoint())
SketchConstraintCoincidence_78.setName("SketchConstraintCoincidence_43")
SketchConstraintHorizontal_5 = Sketch_5.setHorizontal(SketchLine_43.result())
SketchConstraintHorizontal_6 = Sketch_5.setHorizontal(SketchLine_45.result())
SketchConstraintVertical_5 = Sketch_5.setVertical(SketchLine_42.result())
SketchConstraintAngle_4 = Sketch_5.setAngleComplementary(SketchLine_44.result(), SketchLine_45.result(), 60.00000000000006)
SketchConstraintDistance_14 = Sketch_5.setDistance(SketchLine_43.endPoint(), SketchLine_42.result(), 20)
SketchConstraintDistance_15 = Sketch_5.setDistance(SketchLine_42.startPoint(), SketchLine_43.result(), 10)
SketchLine_46 = Sketch_5.addLine(21.9522369740045, 53.01825004597796, 21.9522369740045, 0)
SketchLine_46.setName("SketchLine_18")
SketchLine_46.result().setName("SketchLine_18")
SketchLine_46.setAuxiliary(True)
SketchConstraintCoincidence_79 = Sketch_5.setCoincident(SketchArc_20.startPoint(), SketchLine_46.startPoint())
SketchConstraintCoincidence_79.setName("SketchConstraintCoincidence_44")
SketchConstraintCoincidence_80 = Sketch_5.setCoincident(SketchLine_46.endPoint(), SketchLine_41.result())
SketchConstraintCoincidence_80.setName("SketchConstraintCoincidence_45")
SketchConstraintVertical_6 = Sketch_5.setVertical(SketchLine_46.result())
SketchConstraintDistance_16 = Sketch_5.setDistance(SketchLine_42.endPoint(), SketchLine_46.result(), 5)
SketchConstraintDistance_17 = Sketch_5.setDistance(SketchArc_20.startPoint(), SketchLine_43.result(), 100)
SketchCircle_6 = Sketch_5.addCircle(21.9522369740045, 53.01825004597796, 8)
SketchConstraintCoincidence_81 = Sketch_5.setCoincident(SketchArc_20.startPoint(), SketchCircle_6.center())
SketchConstraintCoincidence_81.setName("SketchConstraintCoincidence_46")
SketchConstraintCoincidence_82 = Sketch_5.setCoincident(SketchLine_46.startPoint(), SketchCircle_6.center())
SketchConstraintCoincidence_82.setName("SketchConstraintCoincidence_47")
SketchConstraintRadius_8 = Sketch_5.setRadius(SketchCircle_6.results()[1], 8)
SketchCircle_7 = Sketch_5.addCircle(21.9522369740045, 53.01825004597796, 4)
SketchConstraintCoincidence_83 = Sketch_5.setCoincident(SketchArc_20.startPoint(), SketchCircle_7.center())
SketchConstraintCoincidence_83.setName("SketchConstraintCoincidence_61")
SketchConstraintCoincidence_84 = Sketch_5.setCoincident(SketchLine_46.startPoint(), SketchCircle_7.center())
SketchConstraintCoincidence_84.setName("SketchConstraintCoincidence_62")
SketchConstraintCoincidence_85 = Sketch_5.setCoincident(SketchCircle_6.center(), SketchCircle_7.center())
SketchConstraintCoincidence_85.setName("SketchConstraintCoincidence_63")
SketchConstraintRadius_9 = Sketch_5.setRadius(SketchCircle_7.results()[1], 4)
SketchLine_47 = Sketch_5.addLine(21.9522369740045, 53.01825004597796, 39.68353296044558, 53.01825004597796)
SketchLine_47.setName("SketchLine_19")
SketchLine_47.result().setName("SketchLine_19")
SketchLine_47.setAuxiliary(True)
SketchConstraintCoincidence_86 = Sketch_5.setCoincident(SketchArc_20.startPoint(), SketchLine_47.startPoint())
SketchConstraintCoincidence_86.setName("SketchConstraintCoincidence_64")
SketchConstraintCoincidence_87 = Sketch_5.setCoincident(SketchLine_46.startPoint(), SketchLine_47.startPoint())
SketchConstraintCoincidence_87.setName("SketchConstraintCoincidence_65")
SketchConstraintCoincidence_88 = Sketch_5.setCoincident(SketchCircle_6.center(), SketchLine_47.startPoint())
SketchConstraintCoincidence_88.setName("SketchConstraintCoincidence_66")
SketchConstraintCoincidence_89 = Sketch_5.setCoincident(SketchCircle_7.center(), SketchLine_47.startPoint())
SketchConstraintCoincidence_89.setName("SketchConstraintCoincidence_67")
SketchConstraintHorizontal_7 = Sketch_5.setHorizontal(SketchLine_47.result())
SketchConstraintDistance_18 = Sketch_5.setDistance(SketchArc_20.endPoint(), SketchLine_47.result(), 105)
SketchLine_48 = Sketch_5.addLine(75, 0, 20.93617039352901, -51.98174995402206)
SketchLine_48.setName("SketchLine_20")
SketchLine_48.result().setName("SketchLine_20")
SketchLine_48.setAuxiliary(True)
SketchConstraintCoincidence_90 = Sketch_5.setCoincident(SketchArc_20.center(), SketchLine_48.startPoint())
SketchConstraintCoincidence_90.setName("SketchConstraintCoincidence_68")
SketchConstraintCoincidence_91 = Sketch_5.setCoincident(SketchArc_20.endPoint(), SketchLine_48.endPoint())
SketchConstraintCoincidence_91.setName("SketchConstraintCoincidence_69")
SketchLine_49 = Sketch_5.addLine(21.9522369740045, 53.01825004597796, 0, 10)
SketchLine_49.setName("SketchLine_21")
SketchLine_49.result().setName("SketchLine_21")
SketchLine_49.setAuxiliary(True)
SketchConstraintCoincidence_92 = Sketch_5.setCoincident(SketchArc_20.startPoint(), SketchLine_49.startPoint())
SketchConstraintCoincidence_92.setName("SketchConstraintCoincidence_70")
SketchConstraintCoincidence_93 = Sketch_5.setCoincident(SketchLine_46.startPoint(), SketchLine_49.startPoint())
SketchConstraintCoincidence_93.setName("SketchConstraintCoincidence_71")
SketchConstraintCoincidence_94 = Sketch_5.setCoincident(SketchCircle_6.center(), SketchLine_49.startPoint())
SketchConstraintCoincidence_94.setName("SketchConstraintCoincidence_72")
SketchConstraintCoincidence_95 = Sketch_5.setCoincident(SketchCircle_7.center(), SketchLine_49.startPoint())
SketchConstraintCoincidence_95.setName("SketchConstraintCoincidence_73")
SketchConstraintCoincidence_96 = Sketch_5.setCoincident(SketchLine_47.startPoint(), SketchLine_49.startPoint())
SketchConstraintCoincidence_96.setName("SketchConstraintCoincidence_74")
SketchLine_50 = Sketch_5.addLine(model.selection("EDGE", "PartSet/OZ"))
SketchLine_50.setName("SketchLine_22")
SketchLine_50.result().setName("SketchLine_22")
SketchConstraintCoincidence_97 = Sketch_5.setCoincident(SketchLine_49.endPoint(), SketchLine_50.result())
SketchConstraintCoincidence_97.setName("SketchConstraintCoincidence_75")
SketchConstraintDistance_19 = Sketch_5.setDistance(SketchLine_49.endPoint(), SketchLine_41.result(), 10)
model.do()
Face_1 = model.addFace(Part_2_doc, [model.selection("WIRE", "Sketch_1/Face-SketchArc_1_2f-SketchArc_7_2f-SketchArc_8_2f-SketchArc_9_2f-SketchArc_10_2f-SketchArc_6_2f-SketchArc_5_2f-SketchArc_4_2f_wire")])
Axis_4 = model.addAxis(Part_2_doc, model.selection("FACE", "PartSet/XOZ"), model.selection("VERTEX", "Sketch_2/SketchArc_3"))
Rotation_3 = model.addRotation(Part_2_doc, [model.selection("FACE", "Face_1_1")], model.selection("EDGE", "Axis_1"), -43.8752)
Pipe_1 = model.addPipe(Part_2_doc, [model.selection("FACE", "Rotation_1_1")], model.selection("EDGE", "Sketch_2/SketchArc_3_2"))
Extrusion_3 = model.addExtrusion(Part_2_doc, [model.selection("WIRE", "Sketch_2/Face-SketchCircle_2_2f-SketchCircle_3_2r_wire"), model.selection("WIRE", "Sketch_2/Face-SketchLine_17r-SketchLine_16r-SketchLine_15r-SketchLine_14r_wire")], model.selection(), "Gap/2", "Gap/2")
Fuse_1 = model.addFuse(Part_2_doc, [model.selection("SOLID", "Pipe_1_1")], [model.selection("SOLID", "Extrusion_1_1"), model.selection("SOLID", "Extrusion_1_2")])
Extrusion_4 = model.addExtrusion(Part_2_doc, [model.selection("FACE", "Sketch_2/Face-SketchCircle_3_2f")], model.selection(), "Gap", "Gap")
Cut_1 = model.addCut(Part_2_doc, [model.selection("SOLID", "Fuse_1_1")], [model.selection("SOLID", "Extrusion_2_1")])
Translation_1 = model.addTranslation(Part_2_doc, [model.selection("SOLID", "Cut_1_1")], model.selection("VERTEX", "Sketch_2/SketchCircle_2_2__cc"), model.selection("VERTEX", "Sketch_2/SketchLine_21_EndVertex"))
model.do()
Part_3 = model.duplicatePart(Part_2)
Part_3.setName("Arm 2")
model.do()
Part_4 = model.duplicatePart(Part_3)
Part_4.setName("Arm 3")
model.do()
Translation_4 = model.addTranslation(partSet, [model.selection("COMPOUND", "Part_2/"), model.selection("COMPOUND", "Part_3/"), model.selection("COMPOUND", "Part_4/")], model.selection("EDGE", "OX"), -40)
Rotation_6 = model.addRotation(partSet, [model.selection("COMPOUND", "Translation_1_2/")], model.selection("EDGE", "OZ"), 120)
Rotation_7 = model.addRotation(partSet, [model.selection("COMPOUND", "Translation_1_3/")], model.selection("EDGE", "OZ"), 240)
Part_5 = model.addPart(partSet)
Part_5.setName("Rod part")
Part_5_doc = Part_5.document()
Parameter_H = model.addParameter(partSet, "H", "110")
Sketch_10 = model.addSketch(Part_5_doc, model.defaultPlane("YOZ"))
SketchLine_93 = Sketch_10.addLine(0, 25, 6, 25)
SketchLine_94 = Sketch_10.addLine(6, 25, 6, -75)
SketchConstraintCoincidence_232 = Sketch_10.setCoincident(SketchLine_93.endPoint(), SketchLine_94.startPoint())
SketchLine_95 = Sketch_10.addLine(6, -75, 4, -75)
SketchConstraintCoincidence_233 = Sketch_10.setCoincident(SketchLine_94.endPoint(), SketchLine_95.startPoint())
SketchLine_96 = Sketch_10.addLine(4, -75, 4, -81.00000000054168)
SketchConstraintCoincidence_234 = Sketch_10.setCoincident(SketchLine_95.endPoint(), SketchLine_96.startPoint())
SketchLine_97 = Sketch_10.addLine(4, -81.00000000054168, 0, -85)
SketchConstraintCoincidence_235 = Sketch_10.setCoincident(SketchLine_96.endPoint(), SketchLine_97.startPoint())
SketchLine_98 = Sketch_10.addLine(0, -85, 0, 25)
SketchConstraintCoincidence_236 = Sketch_10.setCoincident(SketchLine_97.endPoint(), SketchLine_98.startPoint())
SketchConstraintCoincidence_237 = Sketch_10.setCoincident(SketchLine_93.startPoint(), SketchLine_98.endPoint())
SketchConstraintVertical_15 = Sketch_10.setVertical(SketchLine_98.result())
SketchConstraintVertical_16 = Sketch_10.setVertical(SketchLine_94.result())
SketchConstraintVertical_17 = Sketch_10.setVertical(SketchLine_96.result())
SketchConstraintHorizontal_18 = Sketch_10.setHorizontal(SketchLine_93.result())
SketchConstraintHorizontal_19 = Sketch_10.setHorizontal(SketchLine_95.result())
SketchConstraintAngle_7 = Sketch_10.setAngle(SketchLine_97.result(), SketchLine_98.result(), 45.00000000387975)
SketchConstraintDistance_32 = Sketch_10.setDistance(SketchLine_97.endPoint(), SketchLine_95.result(), 10)
SketchConstraintDistance_33 = Sketch_10.setDistance(SketchLine_97.startPoint(), SketchLine_98.result(), 4)
SketchConstraintLength_7 = Sketch_10.setLength(SketchLine_93.result(), "Rod/2")
SketchConstraintDistance_34 = Sketch_10.setDistance(SketchLine_97.endPoint(), SketchLine_93.result(), "H")
SketchPoint_7 = Sketch_10.addPoint(model.selection("VERTEX", "PartSet/Origin"))
SketchConstraintCoincidence_238 = Sketch_10.setCoincident(SketchPoint_7.coordinates(), SketchLine_98.result())
SketchLine_99 = Sketch_10.addLine(model.selection("EDGE", "PartSet/OY"))
SketchConstraintDistance_35 = Sketch_10.setDistance(SketchLine_98.endPoint(), SketchLine_99.result(), "Thickness")
model.do()
Revolution_2 = model.addRevolution(Part_5_doc, [model.selection("FACE", "Sketch_1/Face-SketchLine_6r-SketchLine_5r-SketchLine_4r-SketchLine_3r-SketchLine_2r-SketchLine_1r")], model.selection("EDGE", "Sketch_1/SketchLine_6"), 360, 0)
Sketch_11 = model.addSketch(Part_5_doc, model.selection("FACE", "Revolution_1_1/Generated_Face&Sketch_1/SketchLine_1"))
SketchCircle_14 = Sketch_11.addCircle(0, 0, 8.5)
SketchCircle_14.setAuxiliary(True)
SketchPoint_8 = Sketch_11.addPoint(model.selection("VERTEX", "Sketch_1/SketchLine_1_StartVertex"))
SketchConstraintCoincidence_239 = Sketch_11.setCoincident(SketchCircle_14.center(), SketchPoint_8.result())
SketchConstraintRadius_18 = Sketch_11.setRadius(SketchCircle_14.results()[1], "(Rod+5)/2")
SketchLine_100 = Sketch_11.addLine(-8.5, -4.907477288111821, -8.5, 4.907477288111821)
SketchLine_101 = Sketch_11.addLine(-8.5, 4.907477288111821, -2.182790672831509e-014, 9.814954576223595)
SketchConstraintCoincidence_240 = Sketch_11.setCoincident(SketchLine_100.endPoint(), SketchLine_101.startPoint())
SketchLine_102 = Sketch_11.addLine(-2.182790672831509e-014, 9.814954576223595, 8.5, 4.907477288111624)
SketchConstraintCoincidence_241 = Sketch_11.setCoincident(SketchLine_101.endPoint(), SketchLine_102.startPoint())
SketchLine_103 = Sketch_11.addLine(8.5, 4.907477288111624, 8.5, -4.907477288111966)
SketchConstraintCoincidence_242 = Sketch_11.setCoincident(SketchLine_102.endPoint(), SketchLine_103.startPoint())
SketchLine_104 = Sketch_11.addLine(8.5, -4.907477288111966, 4.843087198023196e-015, -9.814954576223641)
SketchConstraintCoincidence_243 = Sketch_11.setCoincident(SketchLine_103.endPoint(), SketchLine_104.startPoint())
SketchLine_105 = Sketch_11.addLine(4.843087198023196e-015, -9.814954576223641, -8.5, -4.907477288111821)
SketchConstraintCoincidence_244 = Sketch_11.setCoincident(SketchLine_104.endPoint(), SketchLine_105.startPoint())
SketchConstraintCoincidence_245 = Sketch_11.setCoincident(SketchLine_100.startPoint(), SketchLine_105.endPoint())
SketchConstraintVertical_18 = Sketch_11.setVertical(SketchLine_100.result())
SketchConstraintVertical_19 = Sketch_11.setVertical(SketchLine_103.result())
SketchConstraintTangent_15 = Sketch_11.setTangent(SketchCircle_14.results()[1], SketchLine_103.result())
SketchConstraintTangent_16 = Sketch_11.setTangent(SketchCircle_14.results()[1], SketchLine_100.result())
SketchConstraintTangent_17 = Sketch_11.setTangent(SketchLine_104.result(), SketchCircle_14.results()[1])
SketchConstraintTangent_18 = Sketch_11.setTangent(SketchLine_105.result(), SketchCircle_14.results()[1])
SketchConstraintTangent_19 = Sketch_11.setTangent(SketchLine_101.result(), SketchCircle_14.results()[1])
SketchConstraintTangent_20 = Sketch_11.setTangent(SketchLine_102.result(), SketchCircle_14.results()[1])
SketchConstraintEqual_7 = Sketch_11.setEqual(SketchLine_100.result(), SketchLine_101.result())
SketchConstraintEqual_8 = Sketch_11.setEqual(SketchLine_101.result(), SketchLine_102.result())
SketchConstraintEqual_9 = Sketch_11.setEqual(SketchLine_102.result(), SketchLine_103.result())
SketchConstraintEqual_10 = Sketch_11.setEqual(SketchLine_103.result(), SketchLine_104.result())
model.do()
Extrusion_9 = model.addExtrusion(Part_5_doc, [model.selection("FACE", "Sketch_2/Face-SketchLine_13r-SketchLine_12r-SketchLine_11r-SketchLine_10r-SketchLine_9r-SketchLine_8r")], model.selection(), 25, 0)
Sketch_12 = model.addSketch(Part_5_doc, model.standardPlane("YOZ"))
SketchLine_106 = Sketch_12.addLine(9.814954576223595, 48.99999999999999, 9.814954576223595, 52.35726558990813)
SketchLine_107 = Sketch_12.addLine(9.814954576223595, 52.35726558990813, 4, 52.35726558990813)
SketchConstraintCoincidence_246 = Sketch_12.setCoincident(SketchLine_106.endPoint(), SketchLine_107.startPoint())
SketchLine_108 = Sketch_12.addLine(4, 52.35726558990813, 9.814954576223595, 48.99999999999999)
SketchConstraintCoincidence_247 = Sketch_12.setCoincident(SketchLine_107.endPoint(), SketchLine_108.startPoint())
SketchConstraintCoincidence_248 = Sketch_12.setCoincident(SketchLine_106.startPoint(), SketchLine_108.endPoint())
SketchConstraintHorizontal_20 = Sketch_12.setHorizontal(SketchLine_107.result())
SketchConstraintVertical_20 = Sketch_12.setVertical(SketchLine_106.result())
SketchConstraintAngle_8 = Sketch_12.setAngle(SketchLine_108.result(), SketchLine_107.result(), 30)
SketchLine_109 = Sketch_12.addLine(model.selection("EDGE", "[Extrusion_1_1/Generated_Face&Sketch_2/SketchLine_10][Extrusion_1_1/Generated_Face&Sketch_2/SketchLine_9]"))
SketchConstraintCoincidence_249 = Sketch_12.setCoincident(SketchLine_108.endPoint(), SketchLine_109.result())
SketchProjection_2 = Sketch_12.addProjection(model.selection("EDGE", "[Extrusion_1_1/Generated_Face&Sketch_2/SketchLine_10][Extrusion_1_1/To_Face]"), False)
SketchLine_110 = SketchProjection_2.createdFeature()
SketchConstraintDistance_36 = Sketch_12.setDistance(SketchLine_110.result(), SketchLine_108.endPoint(), 1)
SketchLine_111 = Sketch_12.addLine(model.selection("EDGE", "PartSet/OZ"))
SketchConstraintDistance_37 = Sketch_12.setDistance(SketchLine_108.startPoint(), SketchLine_111.result(), 4)
model.do()
Revolution_3 = model.addRevolution(Part_5_doc, [model.selection("FACE", "Sketch_3/Face-SketchLine_14r-SketchLine_15f-SketchLine_16f")], model.selection("EDGE", "PartSet/OZ"), 360, 0)
Cut_12 = model.addCut(Part_5_doc, [model.selection("SOLID", "Extrusion_1_1")], [model.selection("SOLID", "Revolution_2_1")])
Cut_13 = model.addFuse(Part_5_doc, [model.selection("SOLID", "Cut_1_1"), model.selection("SOLID", "Revolution_1_1")], [])

# Test reexecution after parameter change
Parameter_H.setValue(120)
model.do()
model.testResultsVolumes(Part_5, [19052.771316640515578910708427429])
Parameter_H.setValue(110)
model.do()
model.end()

from GeomAPI import  GeomAPI_Shape

model.testNbResults(Part_1, 1)
model.testNbSubResults(Part_1, [0])
model.testNbSubShapes(Part_1, GeomAPI_Shape.SOLID, [1])
model.testNbSubShapes(Part_1, GeomAPI_Shape.FACE, [52])
model.testNbSubShapes(Part_1, GeomAPI_Shape.EDGE, [338])
model.testNbSubShapes(Part_1, GeomAPI_Shape.VERTEX, [676])
model.testResultsVolumes(Part_1, [48835.437112214101944118738174438])

model.testNbResults(Translation_4, 3)
model.testNbSubResults(Translation_4, [0, 0, 0])
model.testNbSubShapes(Translation_4, GeomAPI_Shape.SOLID, [1, 1, 1])
model.testNbSubShapes(Translation_4, GeomAPI_Shape.FACE, [19, 19, 19])
model.testNbSubShapes(Translation_4, GeomAPI_Shape.EDGE, [102, 102, 102])
model.testNbSubShapes(Translation_4, GeomAPI_Shape.VERTEX, [204, 204, 204])
model.testResultsVolumes(Translation_4, [11018.354015402081131469458341599, 11018.354015402081131469458341599, 11018.354015402081131469458341599])

model.testNbResults(Rotation_6, 1)
model.testNbSubResults(Rotation_6, [0])
model.testNbSubShapes(Rotation_6, GeomAPI_Shape.SOLID, [1])
model.testNbSubShapes(Rotation_6, GeomAPI_Shape.FACE, [19])
model.testNbSubShapes(Rotation_6, GeomAPI_Shape.EDGE, [102])
model.testNbSubShapes(Rotation_6, GeomAPI_Shape.VERTEX, [204])
model.testResultsVolumes(Rotation_6, [11018.354015402079312480054795742])

model.testNbResults(Rotation_7, 1)
model.testNbSubResults(Rotation_7, [0])
model.testNbSubShapes(Rotation_7, GeomAPI_Shape.SOLID, [1])
model.testNbSubShapes(Rotation_7, GeomAPI_Shape.FACE, [19])
model.testNbSubShapes(Rotation_7, GeomAPI_Shape.EDGE, [102])
model.testNbSubShapes(Rotation_7, GeomAPI_Shape.VERTEX, [204])
model.testResultsVolumes(Rotation_7, [11018.354015402079312480054795742])

model.testNbResults(Part_5, 1)
model.testNbSubResults(Part_5, [0])
model.testNbSubShapes(Part_5, GeomAPI_Shape.SOLID, [1])
model.testNbSubShapes(Part_5, GeomAPI_Shape.FACE, [13])
model.testNbSubShapes(Part_5, GeomAPI_Shape.EDGE, [55])
model.testNbSubShapes(Part_5, GeomAPI_Shape.VERTEX, [110])
model.testResultsVolumes(Part_5, [17921.797961347954696975648403168])

assert(model.checkPythonDump())
